package com.itheima.day15.work2;

import java.io.IOException;
import java.net.*;

public class ClientDemo {
    public static void main(String[] args) throws IOException {
        DatagramSocket  ds=new DatagramSocket();
        InetAddress adrress = InetAddress.getByName("224.0.0.1");
        String s="组播";
        byte[] bytes = s.getBytes();
        int port=10002;
        DatagramPacket dp=new DatagramPacket(bytes,bytes.length,adrress ,port);
        ds.send(dp);
        ds.close();
    }
}
